import store from '@/store'

export function install() {
	// 请求时增加hearders
    uni.addInterceptor('request', {
        invoke(params) {
			let header = params.header||{}
			params.header = {...header,...store.getters['user/headers']}
        },
		success(e){
		},
        fail(err){
        }
    })
	
	uni.addInterceptor('navigateTo',{
		invoke(e) {
			//console.log(e)
		}
	})
}
